package cn.hchaojie.javase.day01;

public class DemoOperator {
	public static void main(String[] args) {
		int number = 7 / 6;				// 取模
		
		System.out.println(number);
		
		number = 7 % 6;					// 取余数
		
		System.out.println(number);
		
		int total = 35;
		int size = 10;
		
		int page = ((total - 1) / size) + 1;
		
		
		// ++ : 自增运算符
		int i = 2;
		System.out.println(i++);		// 2
		System.out.println(i);			// 3
		System.out.println(++i);		// 4
		System.out.println(i);			// 4
		
		int j = i++;
		System.out.println(j);			// 4
		
		// j = j++;		// j++ -> j=5  -> 4 -> j
		
		int k = j++;
		System.out.println(j);
		j = k;
		System.out.println(j);		// 相当于 j = j++;
	}
}
